#pragma once
#include "Main/stdafx.h"

class GameChatLayer : public cocos2d::Layer
{
public:
	const static int MAX_CHAT_ITEM = 12;
	const static int MAX_FACE_H = 4;
	const static int MAX_FACE_V = 4;
public:
	CREATE_FUNC(GameChatLayer);

	virtual	bool		init();
	virtual void		onEnter();
	virtual void		onExit();
	virtual bool		onTouchBegan(Touch *pTouch, Event *pEvent);
	void				BtnCallBack(Ref* pSender, Widget::TouchEventType touchtype);
	void				selectedItemEvent(cocos2d::Ref *pSender, ListViewEventType type);
private:
	Node*				layoutMain;
	Button*				btn_chat;
	Button*				btn_face;
	ListView*			list_chat;
	ListView*			list_face;
public:
	void				showRightPos();
	void				showListView(int flag = 0);
	void				initListView();
};
